﻿#ifndef CLOUDMODEL_H
#define CLOUDMODEL_H

#include <QMetaType>
#include <QString>
struct BaseObject
{
    bool    isValid() const { return !isInvalid(); }
    bool    isInvalid() const { return name.isNull() || name.isEmpty(); }
    QString name;
};
Q_DECLARE_METATYPE(BaseObject);
struct MyBucket : public BaseObject
{

    MyBucket();
    QString location;
    QString createDate;
    ~MyBucket();
};
struct MyObject : public BaseObject
{
    bool       isDir() const { return isValid() && name.endsWith("/"); }
    bool       isFile() const { return isValid() && !name.endsWith("/"); }
    QString    lastmodified;
    qulonglong size = 0;
    QString    dir;
    QString    key;
};
Q_DECLARE_METATYPE(MyObject);
#endif   // MYBUCKET_H
